package opensource.web.util.db;

import java.util.HashMap;

public class Record extends HashMap<String, Object>{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Record(){
		super();
	}
	
	public Record put(String key, Object value){
		super.put(key, value);
		return this;
	}
	
	public String getString(String key){
		return get(key)==null?"":get(key).toString();
	}
	
	public int getInt(String key){
		return Integer.parseInt(get(key).toString());
	}
	
	public long getLong(String key){
		return Long.parseLong(get(key).toString());
	}
	
	public double getDouble(String key){
		return Double.parseDouble(get(key).toString());
	}
}
